package com.lanou.dllo.vc;

import android.app.Application;
import android.content.Context;

import com.easemob.chat.EMChat;

/**
 * Created by dllo on 15/11/15.
 */
public class DemoApplication extends Application{
    public static Context applicationContext;
    private static DemoApplication instance;
    public static HXSDKHelper hxSDKHelper = new HXSDKHelper() {
        @Override
        protected HXSDKModel createModel() {
            return null;
        }
    };



    @Override
    public void onCreate() {
        super.onCreate();
        applicationContext = this;

        instance = this;

        EMChat.getInstance().init(applicationContext);
        hxSDKHelper.onInit(applicationContext);

    }



    /**

     * this function will initialize theHuanXin SDK

     *

     * @return boolean true if caller cancontinue to call HuanXin related APIs after calling onInit, otherwise false.

     *

     * 环信初始化SDK帮助函数

     * 返回true如果正确初始化，否则false，如果返回为false，请在后续的调用中不要调用任何和环信相关的代码

     *

     * for example:

     * 例子：

     *

     * public class DemoHXSDKHelper extendsHXSDKHelper

     *

     * HXHelper = new DemoHXSDKHelper();

     * if(HXHelper.onInit(context)){

     *    // do HuanXin related work

     * }

     */



    public static String currentUserNick;
}
